import request from '@/utils/request'

/*
export function login(data) {
  return request({
    url: '/vue-element-admin/user/login',
    method: 'post',
    data
  })
}*/

export function login(username, password) {
  console.log('===>api==>login:' + username + ',' + password)
  return request({
    url: 'http://localhost:8090/web-project/users/auth?username=' + username + '&password=' + password,
    method: 'get'
  })
}

/*
export function getInfo(token) {
  return request({
    url: '/vue-element-admin/user/info',
    method: 'get',
    params: {token}
  })
}*/

export function getInfo(token) {
  return request({
    url: 'http://localhost:8090/web-project/users/isLogin',
    method: 'get'
  })
}

export function logout() {
  return request({
    url: 'http://localhost:8090/web-project/users/logout',
    method: 'get'
  })
}
